package cn.ad.server.domain.ad;

import java.io.Serializable;
import java.util.Date;

public class PlatformTagTemplateMap implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 7496719030863728693L;
	static final String VERSION = "0";
	static final String CACHE_NAME = "platformtagtemplatemap";

	private int id;
	private int platformId;
	private String tagId;
	private int templateId;
	private int status;
	private Date createTime;
	private Date updateTime;

	public static String cacheKey(long id) {
		return new StringBuilder(CACHE_NAME).append(":").append(VERSION).append(":").append(id).toString();
	}

	public String toCacheKey() {
		return new StringBuilder(CACHE_NAME).append(":").append(VERSION).append(":").append(this.getId()).toString();
	}
	
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getPlatformId() {
		return platformId;
	}

	public void setPlatformId(int platformId) {
		this.platformId = platformId;
	}

	public String getTagId() {
		return tagId;
	}

	public void setTagId(String tagId) {
		this.tagId = tagId;
	}

	public int getTemplateId() {
		return templateId;
	}

	public void setTemplateId(int templateId) {
		this.templateId = templateId;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public boolean equals(Object arg0) {
		if(arg0 instanceof PlatformTagTemplateMap){			
			return this.id==((PlatformTagTemplateMap)arg0).id;
		}else{
			return super.equals(arg0);
		}
	}
	
	public int hashCode() {
		return id;
	}
	

}
